package 标准代码;

import java.io.*;

/**
 * Created by 5406160@qq.com on LiBoWen 李博闻.
 *
 * @ClassName : 高效字符流一次一行复制字符文件
 * @Author : 54061
 * @Date: 2022/2/14 9:51
 */
public class 默写_高效字符流一次一行复制文本文件 {
    public static void main(String[] args) throws IOException {
        //创建流
        BufferedReader br = new BufferedReader(new FileReader("高效字符流一次一个字符数组复制字符文件.java"));
        BufferedWriter bw = new BufferedWriter(new FileWriter(".txt"));

        //循环读写
        String line;//用来接收每次读到一行数组
        while ((line = br.readLine())!=null){
            //读一行写一行
            bw.write(line);
            //写换行符
            bw.newLine();
            //刷新
            //bw.flush();

        }
        //关流
        br.close();
        bw.close();

    }
}
